//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package test.集合.斗地主4.game;

import java.awt.Color;
import java.awt.Component;
import java.awt.Container;
import java.awt.LayoutManager;
import java.awt.Toolkit;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.ArrayList;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JTextField;
import test.集合.斗地主4.domain.Poker;

public class GameJFrame extends JFrame implements ActionListener {
    public static Container container = null;
    JButton[] landlord = new JButton[2];
    JButton[] publishCard = new JButton[2];
    JLabel dizhu;
    ArrayList<ArrayList<Poker>> currentList = new ArrayList();
    ArrayList<ArrayList<Poker>> playerList = new ArrayList();
    ArrayList<Poker> lordList = new ArrayList();
    ArrayList<Poker> pokerList = new ArrayList();
    JTextField[] time = new JTextField[3];

    public GameJFrame() {
        this.setIconImage(Toolkit.getDefaultToolkit().getImage("image\\poker\\dizhu.png"));
        this.initJframe();
        this.initView();
        this.setVisible(true);
        this.initCard();
        this.initGame();
    }

    public void initCard() {
    }

    public void order(ArrayList<Poker> list) {
    }

    public int getValue(Poker poker) {
        return 0;
    }

    private void initGame() {
        for(int i = 0; i < 3; ++i) {
            ArrayList<Poker> list = new ArrayList();
            this.currentList.add(list);
        }

        this.landlord[0].setVisible(true);
        this.landlord[1].setVisible(true);

        for(JTextField field : this.time) {
            field.setText("倒计时30秒");
            field.setVisible(true);
        }

    }

    public void actionPerformed(ActionEvent e) {
    }

    public void initView() {
        JButton robBut = new JButton("抢地主");
        robBut.setBounds(320, 400, 75, 20);
        robBut.addActionListener(this);
        robBut.setVisible(false);
        this.landlord[0] = robBut;
        container.add(robBut);
        JButton noBut = new JButton("不     抢");
        noBut.setBounds(420, 400, 75, 20);
        noBut.addActionListener(this);
        noBut.setVisible(false);
        this.landlord[1] = noBut;
        container.add(noBut);
        JButton outCardBut = new JButton("出牌");
        outCardBut.setBounds(320, 400, 60, 20);
        outCardBut.addActionListener(this);
        outCardBut.setVisible(false);
        this.publishCard[0] = outCardBut;
        container.add(outCardBut);
        JButton noCardBut = new JButton("不要");
        noCardBut.setBounds(420, 400, 60, 20);
        noCardBut.addActionListener(this);
        noCardBut.setVisible(false);
        this.publishCard[1] = noCardBut;
        container.add(noCardBut);

        for(int i = 0; i < 3; ++i) {
            this.time[i] = new JTextField("倒计时:");
            this.time[i].setEditable(false);
            this.time[i].setVisible(false);
            container.add(this.time[i]);
        }

        this.time[0].setBounds(140, 230, 60, 20);
        this.time[1].setBounds(374, 360, 60, 20);
        this.time[2].setBounds(620, 230, 60, 20);
        this.dizhu = new JLabel(new ImageIcon("images/dizhu.png"));
        this.dizhu.setVisible(false);
        this.dizhu.setSize(40, 40);
        container.add(this.dizhu);
    }

    public void initJframe() {
        this.setTitle("斗地主");
        this.setSize(830, 620);
        this.setDefaultCloseOperation(3);
        this.setResizable(false);
        this.setLocationRelativeTo((Component)null);
        container = this.getContentPane();
        container.setLayout((LayoutManager)null);
        container.setBackground(Color.LIGHT_GRAY);
    }
}
